function registering()
{
	if(!document.getElementById || !document.createTextNode) {return;}
	var errorinfo = ""; //input error informations
	
	var username = document.getElementById('username').value;
	var psword = document.getElementById('psword').value;
	var pswagain = document.getElementById("pswagain").value;
	var truename = document.getElementById("truename").value;
	var phone = document.getElementById("phone").value;
	var email = document.getElementById("email").value;
	//var stunumber = document.getElementById("stunumber").value;
	//var pcard = document.getElementById('pcard').value;
	var sex = document.getElementById("sexer").selectedIndex;
	if(username == "" || psword == "" || pswagain == "" ||
		truename == "" || phone == "" || email == "")	
	{
		errorinfo += "所有信息不能为空! ";
	}
	
	var emailReg = new RegExp("^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$");
	if(!emailReg.test(email))
	{
		errorinfo += "邮箱无效! ";
	}
	
	/*
	var phoneReg = new RegExp("^0?(13[0-9]|15[012356789]|18[0236789]|14[57])[0-9]{8}$");
	if(!phoneReg.test(phone))
	{
		errorinfo += "手机号码无效! ";
	}*/
	
	if(psword != pswagain)
	{
		errorinfo += "两次密码输入不一致! "; 
	}
	
	if(errorinfo != "")
	{
		errorinfo = "错误：" + errorinfo;
		document.getElementById("errorer").firstChild.nodeValue = errorinfo;
	}
	else
	{
		document.getElementById("errorer").firstChild.nodeValue = "";
	}
	return errorinfo;
}

function checkPoor()
{
	var errorMsg = "";
	var basic = registering();
	if(basic != "")
	{
		errorMsg += "请先进行基本信息的填写!" + "(" + basic + ")";
		document.getElementById("errorer").firstChild.nodeValue = errorMsg;
		return;
	}
	
	
	var stunumber = document.getElementById("stunumber").value;
	var pcard = document.getElementById('pcard').value;
	if(stunumber == "" || pcard == "")
	{
		errorMsg += "此两项必须准确填写,不能为空!";
	}
	
	if(errorMsg != "")
	{
		errorMsg = "错误：" + errorMsg;
		document.getElementById("errorer").firstChild.nodeValue = errorMsg;
	}
	else
	{
		document.getElementById("errorer").firstChild.nodeValue = "";
	}
}